package com.yssoft.utils;

import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;

/**
 * @author 陈翼东
 * @time 2018/4/25 下午 12:24
 * @说明
 */
public class PasswordUtil {
    public static void main(String[] args) {
        String hashAlgorithmName = "MD5";
        String credentials = "123456";
        int hashIterations = 2;
        ByteSource credentialsSalt = ByteSource.Util.bytes("admin");
        String obj = new SimpleHash(hashAlgorithmName, credentials, credentialsSalt, hashIterations).toString();
        System.out.println(obj);
    }
}
